Detecting and tracking objects in images

ABSTRACT

According to one disclosed method, coordinates in a multi-dimensional space are determined for an image point characterizing a particular object. An equation describing a model in the space is provided. The model is characteristic of a set of training images of one or more other objects. The coordinates are applied to the equation to determine a distance between the image point and the model. Based on the determined distance, a determination is made as to whether the particular object matches the one or more other objects. A set of training images may be received. A multi-dimensional space (e.g., eigenspace) may be determined based on the set of training images. A set of training points may be generated by projecting the set of training images into the multi-dimensional space. An equation describing a model in the multi-dimensional space that is characteristic of the set of training points may be determined.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No. 12/461,366, filed Aug. 10, 2009 and titled “Detecting and Tracking Objects in Images”, which is a continuation of U.S. patent application Ser. No. 12/078,852, filed Apr. 7, 2008 and titled “Detecting and Tracking Objects in Images”, which is a divisional of U.S. patent application Ser. No. 11/326,345, filed Jan. 6, 2006 and titled “Detecting and Tracking Objects in Images”, which claims priority from U.S. Provisional Patent Application Ser. No. 60/641,734, filed Jan. 7, 2005, and titled “Detecting and Tracking Fingertips in Infrared Images.” The entire contents of the previous applications are incorporated herein by reference for all purposes.

TECHNICAL FIELD

This disclosure relates to image processing, and, more particularly, to detecting an object in an image.

BACKGROUND

Detection and recognition of objects in an image typically involves image filtering and pattern recognition techniques. Detecting and recognizing objects in an image containing hundreds or thousands of pixels may require extensive processing power and may be time consuming. Therefore, it may be useful to reduce the dimensionality of an image before processing the image to detect and recognize objects in the image. One known technique for reducing dimensionality of data is Principal Component Analysis (PCA). PCA is described in, for example, Joliffe I. T., Principal Component Analysis, Springer-Verlag, New York (1986).

PCA uses the eigenvalues and eigenvectors of the covariance matrix of a set of data as representative of valuable features of the set of data, thereby reducing the dimensionality of the set of data.

There exist many methods and mechanisms that enable humans to interact with computers. Computer vision technologies may allow a computer to detect an object within an image captured by a camera. A computer that is capable of detecting and recognizing an object within an image may provide a user with the ability to interact with the computer through the use of hand gestures.

A computer-user interface may be displayed on a surface or screen. One or more cameras may monitor activity in the vicinity of the surface or screen and capture images of the activity in the vicinity of the screen. The computer may then process these images, detect one or more objects within the images, and perceive that a user is using hand gestures to interact with the computer-user interface displayed on the surface or screen.

Some systems attempt to perceive that a user is using hand gestures to interact with the computer-user interface displayed on the surface or screen. Some of these systems simply perceive the brightest object in an image and classify that object as a hand or finger. Consequently, these systems may perceive an object as a hand or finger even though the object is neither a hand nor a finger.

SUMMARY

In order to more accurately identify a hand or a finger in an image and thereby improve the efficacy and efficiency of human interaction with the computer, several disclosed systems (1) recognize an object touching or moving near the surface or screen as a hand or finger and (2) exclude objects that are not recognized as either a hand or a finger.

Methods and apparatus for detection and recognition of fingers touching or moving near a surface or screen are presented. Images are processed in order to detect the presence of a finger and to track the position of the detected finger. The position of a finger may be used by a computer, for example, to control the computer's mouse pointer. The methods presented may be useful for allowing humans to interact with computers in a more natural way than through the use of a conventional mouse and/or keyboard.

In one implementation, a model of one or more fingers positioned in one or more orientations is created. In particular, a set of training images of one or more fingers is captured by a camera. Applying the PCA technique, a model of the set of training images is created. The covariance matrix of the set of training images is determined and a select number of eigenvectors of the covariance matrix is selected to define an eigenspace for the set of training images. Each of the images of the set of training images is projected into the eigenspace defined by the selected eigenvectors of the covariance matrix. In the eigenspace, each training image is represented by a single training point. Therefore, projecting each training image into the eigenspace creates a cloud of training points in the eigenspace. The cloud of training points is then modeled by a geometric model (e.g., surface or line) in the eigenspace.

The model is then used to detect, recognize, and track fingers within an image. In one system, a camera and an infrared (IR) illuminator are placed behind the surface or screen. A finger touching or moving near the surface or screen reflects some of the IR radiation projected by the IR illuminator. Part of the reflected IR radiation is captured in an image by the camera. The image is then processed, as explained below, to detect and recognize the presence and position of the finger within the image.

The processing includes extracting from the image one or more objects that potentially may be fingers. Each extracted object is projected into the eigenspace that was defined for the set of training images. In the eigenspace, the projection of the extracted object is represented by a single image point. The coordinates of the single image point are compared to the model of the cloud of training points to determine whether the single image point matches, or nearly matches, the model. If the single image point matches, or nearly matches, the model, the object is determined to be a finger. If the object is determined to be a finger, the position of the finger with respect to the screen or surface (for example, an (x,y) coordinate) is calculated and entered into, for example, the computer and/or software application.

According to a general aspect, coordinates for an image point in a multi-dimensional space are determined, the image point characterizing a particular object. An equation describing a model in the multi-dimensional space is provided, the model being characteristic of a set of training images of one or more other objects. The coordinates are applied to the equation to determine a distance between the image point and the model, and a determination is made as to whether the particular object matches the one or more other objects based on the determined distance.

Implementations of the above general aspect may include one or more of the following features. For example, an image of the particular object may be received. The image may have a number of data elements, and the multi-dimensional space may have a dimensionality that is lower than the number of data elements. Determining the coordinates for the image point may include projecting the image into the multi-dimensional space to produce the coordinates for the image point in the multi-dimensional space.

The model may be a model of a set of training points in the multi-dimensional space, each of the training points in the set corresponding to one or more images in the sequence of training images.

The image of the particular object may be normalized before being received. Normalizing the image of the particular object may account for variations in brightness. Normalizing the image of the object may include applying a histogram equalization technique to the image of the particular object.

The equation may describe a hyperboloid, a cone, a line, or a combination of a cone and a line. The particular object may include an object from the set consisting of a finger, a pen, and substantially cylindrical objects.

Providing the equation may include selecting the equation from among a first equation and a second equation, the first equation describing a first model characteristic of a first set of training images, and the second equation describing a second model characteristic of a second set of training images.

According to another general aspect, an image of a particular object is received, the image having a number of data points. The image is projected into a multi-dimensional space having a dimensionality that is lower than the number of data points to produce coordinates for an image point in the multi-dimensional space, where the image point characterizes the particular object. An equation describing a model in the multi-dimensional space is provided, the model being a model for a set of training points in the multi-dimensional space, and each of the training points in the set corresponding to one or more images in a training set of images of one or more other objects. The coordinates are applied to the equation to determine a distance between the image point and the model and a determination is made as to whether the particular object matches the other objects based on the determined distance.

Implementations of the above general aspect may include one or more of the following features. For example, providing the equation may include selecting the equation from among a first equation and a second equation, where the first equation describes a first model characteristic of a first set of training images, and the second equation describes a second model characteristic of a second set of training images.

According to another general aspect, a system includes a camera and a processing device coupled to the camera. The processing device is configured to determine coordinates for an image point in a multi-dimensional space, the image point characterizing a particular object. The processing device is also configured to provide an equation describing a model in the multi-dimensional space, the model being characteristic of a set of training images of one or more other objects. The processing device is further configured to apply the coordinates to the equation to determine a distance between the image point and the model and to determine whether the particular object matches the one or more other objects based on the determined distance.

Implementations of the above general aspect may include one or more of the following features. For example, the camera may be an IR camera. The system may include an IR source. The system may include a screen disposed in front of the camera. The screen may be at least translucent such that light reflected by an object disposed on a side of the screen opposite the camera can pass through the screen and be received by the camera.

According to another general aspect, a tool is provided for determining coordinates for a particular image point in a multi-dimensional space, the particular image point characterizing a particular object. The tool also provides an equation describing a model in the multi-dimensional space, the model being characteristic of a set of training images of one or more other objects. The tool is also provided for applying the coordinates to the equation to determine a distance between the particular image point and the model, and to determine whether the particular object matches the one or more other objects based on the determined distance.

Implementations of the above general aspect may include one or more of the following features. For example, the set of training images may be received, each of the images in the set having a number of data elements. The multi-dimensional space may be determined based on the set of training images and the multi-dimensional space may have a dimensionality that is lower than the number of data elements. A set of training points may be generated by projecting each image in the set of training images into the multi-dimensional space to produce coordinates for a corresponding training point in the multi-dimensional space. Each training point in the set of training points may correspond to at least one of the images in the set of training images. The equation describing the model in the multi-dimensional space characteristic of the set of training images may be determined.

Each image in the set of training images may be normalized before being received. Normalizing each image in the set of training images may account for variations in brightness. Normalizing each image in the set of training images may include applying a histogram equalization technique to each image in the set of training images.

The various aspects, implementations, and features may be implemented using, for example, one or more of a method, an apparatus, an apparatus or tool or processing device for performing a method, a program or other set of instructions, an apparatus that includes a program or a set of instructions, and a computer readable medium. The computer readable medium may include, for example, instructions, software, images, and other data.

The details of one or more implementations are set forth in the accompanying drawings and the description below. Other features will be apparent from the description and drawings, and from the claims.

DESCRIPTION OF DRAWINGS

The patent or application file contains at least one drawing executed in color. Copies of this patent or application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.

FIG. 1 is an illustration of one system for recognizing and tracking fingers.

FIG. 2( a) is a sample image illustrating two objects within an image.

FIG. 2( b) is a sample shadow matrix providing an illustration of the two extracted objects from the sample image of FIG. 2( a).

FIG. 3 illustrates a diagram for determining if an object extracted from an image is too large to be an object of interest.

FIG. 4( a) is a process flowchart illustrating a first process for training a finger recognition and tracking system.

FIG. 4( b) is a process flowchart illustrating a process for performing operation 410 of FIG. 4( a).

FIG. 5 is a sample image of a finger.

FIG. 6 is an illustration of a cloud of training points in a three-dimensional eigenspace.

FIG. 7( a) is another sample image of a finger.

FIG. 7( b) is a sample image of the same finger as in FIG. 7( a) but with the finger having a different orientation.

FIG. 8( a) is yet another sample image of a finger.

FIG. 8( b) is a sample image of the same finger as in FIG. 8( a) but with the finger having a different orientation.

FIG. 9( a) is an illustration of a cloud of training points in a three-dimensional eigenspace.

FIG. 9( b) is an illustration of the projections of the sample images of FIGS. 8( a) and 8(b) in the three-dimensional eigenspace of FIG. 9( a).

FIG. 10( a) is an illustration of the cloud of training points of FIG. 9( a) and a three-dimensional model corresponding to the cloud of image points.

FIG. 10( b) is a color version of FIG. 10( a).

FIG. 11( a) is an illustration of a truncated model corresponding to the cloud of training points of FIG. 9( a).

FIG. 11( b) is an illustration of the truncated model of FIG. 11( a) and the cloud of training points corresponding to the model.

FIG. 11( c) is a color version of FIG. 11( b).

FIG. 12 is a process flowchart illustrating a process for recognizing a finger in an image using the system trained with the process of FIG. 4( a).

FIG. 13 is a process flowchart illustrating a second process for training a finger recognition and tracking system.

FIG. 14 is an illustration of another cloud of training points in a three-dimensional eigenspace.

FIG. 15 is an illustration of a first subset of the cloud of training points of FIG. 14 forming a cone-like shape.

FIG. 16 is an illustration of a second subset of the cloud of training points of FIG. 14 forming a line-like shape.

FIG. 17( a) is an illustration of the first subset of training points of FIG. 15, and a vertical cone model corresponding to the first subset of training points.

FIG. 17( b) is an illustration of the first subset of training points of FIG. 15, and a truncated vertical cone model corresponding to the first subset of training points.

FIG. 17( c) is a color version of FIG. 17( a).

FIG. 17( d) is a color version of FIG. 17( b).

FIG. 18( a) is an illustration of the second subset of training points of FIG. 16, and a line model corresponding to the second subset of training points.

FIG. 18( b) is a color version of FIG. 18( a).

FIG. 19 is a process flowchart illustrating a process for recognizing a finger in an image using the system trained with the process of FIG. 13.

FIG. 20 is a process flowchart illustrating another process for recognizing an object in an image.

DETAILED DESCRIPTION

Systems and methods for detecting and recognizing fingers touching or moving near a surface are disclosed. These systems and methods may also be used to detect and recognize other objects touching or moving near a surface. Furthermore, these systems and methods may also be used to detect and recognize objects in a field of vision absent a surface. More generally, these systems and methods may be used to detect and recognize objects in an image.

FIG. 1 is an illustration of an exemplary system 100 for recognizing and tracking one or more fingers. An infrared (IR) illuminator 102 positioned behind a surface 104 illuminates an area 106 that extends both behind and in front of the surface 104. A camera 108 equipped with an IR filter 110 is positioned behind the surface 104 and captures images of, for example, the surface 104 and its vicinity. An image captured by the camera 108 may be represented digitally by data elements (e.g., pixels). A projector 112 positioned behind the surface 104 may project a computer-user interface on the surface 104. The computer-user interface projected on the surface 104 may be a conventional computer display. The projector 112 may project IR in addition to visible light. Therefore, the projector 112 may be equipped with an optional IR filter 120 to reduce or eliminate the IR projected by the projector 112.

The techniques and apparatus disclosed may allow a user to interact with the computer-user interface using hand gestures.

For example, the position of a user's finger 114 may be tracked, allowing the user to control the location of the mouse pointer on the computer-user interface by touching the surface 104 with his/her finger 114 or by moving his/her finger 114 near the surface 104. The position of the user's finger 114 may be used, for example, to represent the desired location of the mouse pointer. In some implementations, in order to accurately discern the position of the user's finger 114, it may be desirable to distinguish the user's finger 114 from the user's palm 118.

The system 100 illustrated in FIG. 1 is merely an example of one implementation and other configurations are possible. An image captured by the camera 108 may be generated by capturing light reflected by objects. Light may include IR, visible light, ultra-violet, or any other form of electromagnetic radiation. Thus, an IR illuminator 102 may not be required. Other light sources may be substituted for the IR illuminator. In an alternative implementation, no light source may be required. Instead, the system 100 may rely solely on reflected ambient light. Furthermore, the camera 108 is not required to be positioned behind the surface 104. For example, the camera 108 may be positioned anywhere else in the system 100 deemed advantageous. In addition, the system 100 need not be implemented to facilitate human-computer interaction. Instead, in one implementation, the system 100 may be used to detect objects within images captured by a camera 108. In such an implementation, a surface 104 may not be required.

In general, many processing operations may be involved in detecting and recognizing an object in an image as a finger. For example, the system 100 first may be trained to recognize an object as a finger. The training stage may involve capturing a set of training images of one or more fingers positioned in one or more orientations and building a model of the set of training images. In the recognition stage, the system 100 may capture an image, extract an object from the captured image, and compare the extracted object to the model of the set of training images generated during the training stage to determine if the extracted object is a finger. Processing that may be involved in detecting and recognizing an object in an image as a finger is described in greater detail below.

A region of interest (ROI) 116 of an image may be defined as the portion of the image that includes the surface 104. The ROI of an image 116 may be examined for the detection and recognition of one or more fingers 114. An image captured by the camera 108 may include reflections of the IR generated by the IR illuminator 102 and reflected by one or more fingers within the ROI 116, or the IR may be reflected by one or more other objects within the ROI 116. For example, the surface 104 may reflect IR.

In order to account for the IR consistently reflected by the surface 104 or other objects within the ROI 116, a background model (BGM) of the IR consistently reflected by the surface 104 or other objects within the ROI 116 may be created and subtracted from each image captured by the camera 108. Subtracting the BGM from each image captured by the camera 108 may effectively exclude, or at least reduce, IR attributable to background objects that is processed from a captured image. Consequently, subtracting the BGM from each image may enhance the contrast between an object of interest within the ROI 116 and the surface 104 and/or other objects consistently within the ROI 116.

The BGM may be created by capturing a number of images of the ROI 116 with no objects of interest present and then averaging the captured images pixel by pixel to create a new, average image, or BGM. The BGM then may be subtracted from each image captured by the camera 108. This process may be described by the equation:

$\begin{matrix} {{J\left( {x,y} \right)} = \left\{ \begin{matrix} {{0\mspace{14mu} {if}\mspace{14mu} {{{I\left( {x,y} \right)} - {B\left( {x,y} \right)}}}} < ɛ} \\ {{{{I\left( {x,y} \right)} - {B\left( {x,y} \right)}}}\mspace{14mu} {otherwise}} \end{matrix} \right.} & (1) \end{matrix}$

where I is an image, B is the BGM, ε is an adjustable threshold (for example, an adjustable constant), and J is the resulting image. The BGM may be updated, for example, randomly, periodically, or upon the occurrence of a triggering event.

Referring to FIGS. 2( a), 2(b), and 3, examples of processes for detecting the presence of an object within an image and making an initial determination of whether the object is an object of interest are illustrated.

In particular, FIG. 2( a) illustrates two objects 202(a), 204(a) within a sample image 200(a). As illustrated in FIG. 2( a), objects 202(a) and 204(a) are shown as darker than the background 206(a). However, in an image 200(a) formed by light reflected by two objects 202(a), 204(a), the two objects 202(a), 204(a) would be expected to be brighter than the background 206(a). Thus, it should be appreciated that the image 200(a) of FIG. 2( a) is merely an example of two objects 202(a), 204(a) in an image 200(a) and that the image 200(a) is not intended to suggest that objects in an image will be darker than the background of the image.

In order to extract the objects 202(a), 204(a) from the image 200(a), a blob analysis algorithm, such as the Grassfire algorithm, may be employed. The Grassfire algorithm is described in, for example, Pitas I., Digital Image Processing Algorithms, Prentice-Hall, New York (1993). Other algorithms for detecting the presence of an object within an image and extracting the object from the image may be employed.

The Grassfire algorithm may search an image for objects and identify each pixel of each object it detects with a common label. In particular, in an image formed by light reflected by objects in which the objects are brighter than the background, the Grassfire algorithm may determine the brightest pixel in the image. For example, the image may be a grayscale image with 256 possible values for each pixel. That is, each pixel may be assigned a value from 0-255 with zero representing the least bright pixel possible (e.g., absolute black) and 255 representing the brightest pixel possible (e.g., absolute white). The brightest pixel in the image may have a value of 220. The Grassfire algorithm may compare each pixel in the image against an adjustable threshold constant relative to the brightest pixel in the image to determine whether the pixel corresponds to an object. For example, the adjustable threshold value may be 50. Therefore, the Grassfire algorithm may consider any pixel in the image within 50 shades of the brightest pixel as representing an object. That is, any pixel with a value within the acceptable range 170-220 may be considered as representing an object. The Grassfire algorithm then may consider any set of adjacent pixels falling within the acceptable range as constituting an object.

The Grassfire algorithm may produce a matrix called a shadow matrix that is the same size as the original image. Elements of the shadow matrix that correspond to pixels identified as representing an object in the original image may be identified by common labels. FIG. 2( b) illustrates an example of a shadow matrix 200(b) corresponding to the sample image 200(a) illustrated in FIG. 2( a). Object 202(a) in sample image 200(a) is represented by object 202(b) in shadow matrix 200(b) and each element of object 202(b) is identified with a common label “1.” Similarly, object 204(a) in sample image 200(a) is represented by object 204(b) in shadow matrix 200(b) and each element of object 204(b) is identified with a common label “2.” As illustrated in FIG. 2( b), the Grassfire algorithm may effectively extract objects 202(a) and 204(a) from sample image 200(a).

Referring again to FIG. 1, ideally, if finger 114 is touching the surface 104 or moving near the surface 104, then finger 114 would produce the brightest object in an image. Unfortunately, finger 114 touching the surface 104 or moving near the surface 104 may not always produce the brightest object within an image. For example, when a user touches the surface 104 with his/her finger 114, the user's palm 118 may reflect enough IR radiation to appear as a bright object in an image. Other objects, such as, for example, a long sleeve, also may reflect enough IR radiation to appear as bright objects in an image. Some objects may reflect more IR radiation than the user's finger 114 and consequently may appear as brighter objects in an image than the user's finger 114.

Therefore, in one implementation, several objects in an image—not just the brightest object—may be extracted from the image. However, processing many objects within an image for recognition may require extensive processing power and may be time consuming. Therefore, techniques may be applied to reduce the number of extracted objects that are processed for recognition. An extracted object may exhibit features that make it unlikely that it is a finger and therefore may be discarded. One criterion that may be used to sort extracted objects may be size. For example, an extracted object may be too large to be a finger. Similarly, an extracted object may be too small to be a finger.

FIG. 3 is a diagram 301 that is used to illustrate an example of a process for determining if an object 300 extracted from an image is too large to be a finger. One or more pixels within four sampling areas 304, 306, 308, 310 surrounding the center 302 of an extracted object 300 may be sampled. The distance between the center 302 of an extracted object 300 and the sampling areas 304, 306, 308, 310 may be, for example, an adjustable constant. As shown in FIG. 3, two sampling areas 304, 308 surrounding the center 302 of the extracted object 300 may be located on a vertical line 312 passing through the center 302 of the extracted object 300. Similarly, two sampling areas 306, 310 surrounding the center 302 of the extracted object 300 may be located on a horizontal line 314 passing through the center 302 of the extracted object.

Due to the fact that an image of a finger 114 may sometimes include a tail (see, e.g., FIG. 5), the sampling areas 304, 306, 308, 310 may be considered in pairs. For example, the two sampling areas 306, 310 located on the horizontal line 314 passing through the center 302 of the extracted object 300 may be considered as a first pair. Similarly, the two sampling areas 304, 308 located on the vertical line 312 passing through the center 302 of the extracted object 300 may be considered as a second pair.

If the sum of the pixel values within the first pair of sampling areas 306, 310 exceeds an acceptable threshold level, it may be determined that the sampling areas 306, 310 are part of the extracted object 300. If the sum of the pixel values within the first pair of sampling areas 306, 310 exceeds the acceptable threshold level, the sum of the pixel values within the second pair of sampling areas 304, 308 then may be compared to the acceptable threshold level.

If the sum of the pixel values within the second pair of sampling areas 304, 308 exceeds an acceptable threshold level, it may be determined that the sampling areas 304, 308 are part of the extracted object 300. If the sum of the pixel values within the first pair of sampling areas 306, 310 exceeds the acceptable threshold level and the sum of the pixel values within the second pair of sampling areas 304, 308 exceeds the acceptable threshold level, the object may be determined to be too large to be a finger and consequently the object may be discarded.

Similarly, objects extracted from an image may be too small to be a finger. The number of pixels representing each extracted object may be counted. If the number of pixels representing an object is less than a threshold constant, the object may be determined to be noise, or some other object, and consequently the object may be discarded.

Recognizing an image in an object as a finger may involve a training stage and a recognition stage. In the training stage, the system 100 may be trained to recognize an object by exposing the system 100 to a large set of training images of the object to be recognized. The set of training images may contain images of the object to be recognized positioned in various different orientations. During the recognition stage, the system 100 may detect an object in an image and compare the object to the set of training images, or a model of the set of training images, to determine whether the object is the object to be recognized.

In one implementation, during the training stage, a large number of images of one or more fingers positioned in various different orientations are captured. The covariance matrix of the set of training images is determined and a selected set of eigenvectors of the covariance matrix is used to define an eigenspace. Any number of eigenvectors may be selected to define the eigenspace. The dimensionality of the eigenspace is defined by the number of eigenvectors selected to define the eigenspace. For example, a three-dimensional eigenspace is defined by selecting three eigenvectors, for example, the eigenvectors corresponding to the three largest eigenvalues. Each training image from the set of training images is projected into the three dimensional eigenspace, creating a collection of three-dimensional points in the eigenspace. The collection of three-dimensional points in the eigenspace is modeled by a three-dimensional geometric model (e.g., a quadratic surface or line) capable of being expressed analytically by a polynomial. For example, the projection of the set of training images may form a hyperboloid-like or a cone-like surface. Additionally or alternatively, the projection of the set of training images may form a line-like geometric form in the eigenspace. In a three-dimensional space, hyperboloids, cones, and lines may be expressed analytically by polynomials. Therefore, geometric forms (also referred to as geometric models) may be used to model such a set of training images in an eigenspace.

During the recognition stage of this implementation, an object extracted from an image is projected into the eigenspace defined during the training stage. The three coordinates identifying the three-dimensional point corresponding to the projected image in the eigenspace are applied to the polynomial defining the model of the set of training images in the eigenspace to determine the distance of the projected object from the model in the eigenspace. If the projected object is within, for example, a defined distance of the model, the projected object may be determined to be a finger.

Referring now to FIGS. 5-20, implementations of the training and recognition stages are described in greater detail.

FIG. 4( a) is a process flow chart illustrating an exemplary process 400 for training the system 100 to recognize an object in an image as a finger. The process 400 begins by creating a BGM of the IR reflected by the surface 104 or other objects consistently within the ROI 116 (operation 402). A large number of input images of a finger 114 positioned in various different orientations then are captured by the camera 108 (operation 404). The BGM then is subtracted from each of the input images (operation 406). The portion of each image representing the finger 114 then is extracted from the image and converted into a standard n×n image size (operation 408). The portion of each image representing the finger 114 may be extracted using a blob analysis algorithm, such as the Grassfire algorithm, or the portion of each image representing the finger 114 may be extracted manually based on the visual appearance of the image. The extracted portion of the image representing the finger may include a large number of pixels. In order to reduce the computational power involved in processing the portion of the image representing the finger, it may be desirable to reduce the number of pixels used to represent the finger. Therefore, the resolution of the extracted portion of the image representing the finger may be reduced. For example, the portion of the image representing the finger in the original image may be 64 pixels by 64 pixels. After the 64×64 portion of the image representing the finger is extracted from the image, the resolution of the extracted finger may be reduced such that the finger is represented by a 16×16 image.

FIG. 5 illustrates an exemplary n×n image 500 of a finger 502.

An eigenspace for the set of n×n training images then is defined (operation 410).

Operation 410 is illustrated in greater detail in FIG. 4( b). First, the covariance matrix C of the set of training images is determined (operation 410(a)). If a reshaped, n×n image, I_((n×n)), is represented by a vector V_((m)) where m=n² the covariance matrix C of the set of t training images {I₁, I₂, . . . , I_(t)} may be defined as:

C=G ^(T) G,  (2)

where G is a t×m matrix with elements G_(i,j)=(V_(i,j)−μ_(i)) in which V_(i,j) is the jth element of vector V_(i), the vector of the reshaped image I_(i) of the training set, and μ_(i) is the mean of vector V_(i). The covariance matrix C, therefore, is an m×m matrix. The eigenvalues and eigenvectors of the covariance matrix then may be determined (operation 410(b)). The eigenvalues and eigenvectors of the covariance matrix may be obtained by solving the equation:

Δ=Φ^(T) CΦ.  (3)

where A is the set of eigenvalues of the covariance matrix C and Φ is the set of eigenvectors of the covariance matrix C. This process is described in U.S. Pat. No. 5,710,833. An m×m covariance matrix will have m eigenvalues and m eigenvectors, each eigenvector corresponding to a single eigenvalue. Thus a 256×256 covariance matrix for a set of 16×16 training images will have 256 eigenvalues and 256 corresponding eigenvectors. In addition, each eigenvector will be a column vector of length 256.

All of the eigenvectors of the covariance matrix C are perpendicular to one another.

Consequently, an eigenspace for the set of training images may be defined by selecting a set of eigenvectors of the covariance matrix C and using each of the selected eigenvectors to define one direction (i.e., dimension) in the space (operation 410(c)). The eigenvectors corresponding to the largest eigenvalues of the covariance matrix C indicate the directions in which the set of training images exhibit the greatest variation. Therefore, a large portion of the data contained within the set of training images may be characterized by selecting a set of eigenvectors corresponding to several of the largest eigenvectors of the covariance matrix C. In one implementation, the eigenvectors corresponding to the three largest eigenvalues of the covariance matrix C are selected to define a three-dimensional eigenspace.

After an eigenspace has been defined, each training image from the set of training images is projected into the eigenspace (operation 410(d)). Each n×n image I_((n×n)) is converted into a vector V_((m)) where m=n². For example, if image I_((n×n)) is a 16×16 image, vector V_((m)) is a row vector of length 256 (m=n²=16×16=256). The eigenspace may be defined by an m×q matrix where q is the number of eigenvectors selected to define the eigenspace and each of the q columns of the matrix represents one of the eigenvectors selected to define the eigenspace. The vector V_((m)) then may be multiplied by the m×q matrix defining the eigenspace resulting in a 1×q matrix, or row vector, wherein each element of the row vector identifies a corresponding coordinate in the eigenspace. For example, a 16×16 image I_((16×16)) may be represented by a 256×1 column vector V_((256×1)). If the eigenspace for the set of training images is defined by three eigenvectors, the transpose of the image vector V_(256×1) may be multiplied by the 256×3 matrix defining the eigenspace to obtain a 1×3 row vector defining the three coordinates of the projected image in the three-dimensional eigenspace.

Thus, the projection of an image into an eigenspace may effectively reduce the dimensionality of the image. The projection of an image in an eigenspace is a single point with as many coordinates as the dimensions of the eigenspace. For example, the projection of an image in a three-dimensional eigenspace is a three-dimensional point (i.e., the point is defined by three coordinates). Thus, when an n×n image is projected into a three-dimensional eigenspace, the image is transformed from being defined by n² pixels to being defined by a single point identified by three coordinates.

FIG. 6 illustrates an example of a three-dimensional eigenspace 600 for a set of training images of one or more fingers positioned at various orientations. The projection of each image of the set of training images is represented by a three-dimensional point in the eigenspace 600. Therefore, as illustrated in FIG. 6, projecting the set of training images into the eigenspace 600 may create a cloud of training points 602 in the eigenspace 600. The cloud of training points 602 may exhibit a recognizable geometrical shape. For example, the cloud of training points 602 in FIG. 6 appears to exhibit a hyperboloid-like or cone-like shape.

The shape of the cloud of training points 602 may be a function of the special features of a finger.

When a finger 114 is perpendicular to the surface 104, the finger 114 may appear as a substantially circular object in an image captured by the camera 108. Even if the user rotates his/her hand, the finger 114 may continue to appear as a substantially circular object in an image captured by the camera 108 so long as the finger 114 remains perpendicular to the surface 104. In other words, if the finger 114 remains perpendicular to the surface 104, the shape of the finger 114 in a series of images captured by the camera 108 may exhibit only slight variations even if the hand is rotated. This process of exhibiting only slight variations may hold regardless of where, with respect to the camera 108, the finger 114 is pointing on the surface 104.

However, if the user's finger 114 is not perpendicular to the surface 104, the finger 114 may appear as a bright spot with a tail in an image captured by the camera 108. The tail may be IR reflected by the body of the finger 114. Consequently, if the hand is rotated, the angle of the tail rotates.

FIGS. 7( a) and 7(b) are illustrative. FIG. 7( a) is an n×n image 700(a) of a finger 114 with a tail 702(a). In FIG. 7( a), the tail 702(a) is directed toward the upper left corner of the image 700(a). FIG. 7( b) is an n×n image 700(b) of the same finger 114 with a tail 702(b). In FIG. 7( b), the tail 702(b) is directed toward the upper right corner of the image 700(b). The different orientation of the tails 702(a), 702(b) may be explained by the fact that the finger 114 is oriented differently with respect to the camera 108 in the two images 700(a), 700(b). The finger 114 in image 700(a) and the finger 114 in image 700(b) form the same, non-perpendicular angle with the surface 104. However, the finger 114 in image 700(b) has been rotated from the position of the finger 114 in image 700(a) such that the finger 114 in image 700(a) and the finger 114 in image 700(b) form different angles with a plane (not shown) normal to the surface 104.

Due to the fact that the two images 700(a), 700(b) are different, they will be represented by different points in the cloud of training points 602 in the eigenspace 600. However, because the process of projecting images into an eigenspace 600 is a linear process, the projection of a set of images capturing a finger 114 with a tail of substantially the same length but with different angles of rotation may result in a set of points aligned in a substantially circular pattern (not shown) in the eigenspace 600. Therefore, while the two images 700(a), 700(b) will be represented by different points in the cloud of training points 602 in the eigenspace 600, they may be aligned along a substantially circular pattern within the eigenspace 600.

The length of the tail of a finger in an image may also impact the location of the projection of the image in the eigenspace 600. As described above in connection with FIGS. 7( a) and 7(b), projections of images of fingers with substantially the same tail length but different angles of rotation may be aligned in a substantially circular pattern in the eigenspace 600. The projection of a set of images of a finger 114 with the same short tail but different angles of rotation may be aligned in a substantially circular pattern with a smaller relative radius than the projection of a set of images of a finger 114 with the same long tail but different angles of rotation.

FIGS. 6, 8(a), 8(b), 9(a), and 9(b) are illustrative. The training points that form a vertex 604 of the cloud of training points 602 in FIG. 6 may be associated with training images in which the finger 114 appears as a substantially circular shape with little or no tail. In contrast, the training points that form a base 606 of the cloud of training points 602 in FIG. 6 may be associated with training images in which the finger 114 is trailed by a long tail.

FIG. 8( a) illustrates a training image 800(a) of a finger 114 with a relatively long tail 802(a) caused by a relatively small angle between the finger 114 and the surface 104. FIG. 8(b) illustrates a training image 800(b) of a finger 114 with a relatively shorter tail 802(b) caused by a relatively large angle between the finger 114 and the surface 104.

FIGS. 9( a) and 9(b) illustrate the projections 800(a)′, 800(b)′ of the two images 800(a), 800(b) in the three-dimensional eigenspace 600. As illustrated in FIG. 9( a), the image 800(a) of the finger 114 with the longer tail 802(a) is projected onto a point 800(a)′ near the base of the cloud of training points 602 because it has a relatively long tail 802(a). In contrast, the image 800(b) of the finger 114 with the shorter tail 802(b) is projected onto a point 800(b)′ near the vertex 604 of the cloud of training points 602 because it has a relatively small tail 802(b).

FIG. 9( b) illustrates the projections 800(a)′, 800(b)′ of the two images 800(a), 800(b) in the three-dimensional eigenspace 600 in isolation from the cloud of training points 602. As illustrated in FIG. 9( b), the projection 800(a)′ is aligned in a substantially circular pattern 902 with projections of images of fingers exhibiting the same relatively long tail but different angles of rotation. Similarly, the projection 800(b)′ is aligned in a substantially circular pattern 904 with projections of images of fingers exhibiting the same relatively short tail but different angles of rotation.

The cloud of training points 602 may exhibit a recognizable geometrical shape and therefore the cloud of training points 602 may be amendable to being modeled by a geometric model capable of being expressed analytically by a polynomial. In order to facilitate the fitting of a geometric model to the cloud of training points 602, a technique known as the Transfer-to-Centre (TTC) technique may be applied to each of the training points (operation 412). The TTC technique is described in, for example, Shamaie A. et. al., “International Journal of Scientia Iranica,” 6(1), (1999). The TTC technique transfers the data set to the center of the eigenspace. In other words, the centroid of the data set is moved to the origin of the eigenspace.

After the TTC technique has been applied to the set of training points, a model is fitted to the cloud of training points 602 (operation 414). The general equation for a three-dimensional quadratic surface is given by:

F(x,y,z)=ax ² +by ² +cz ² +dxy+exz+ftz+gx+hy+iz+1  (4)

If the cloud of points 602 defined a perfect quadratic surface, the following equation would hold for each point in the cloud 602:

F(x,y,z)=0  (5)

where x, y, and z are the coordinates of each point in the cloud of points 602. The unknown parameters of Equation 4 are Ψ=(a, b, c, d, e, f, g, h, i). In order to fit a quadratic surface to the cloud of training points 602, values for the unknown parameters in Equation 4 are determined such that an error function is minimized for the set of points in the cloud of training points 602. The error function is defined by the equation:

$\begin{matrix} {E = {\sum\limits_{{({x,y,z})} \in {TS}}{F^{2}\left( {x,y,z} \right)}}} & (6) \end{matrix}$

where TS is the set of projected training points. The error function can be expanded to:

$\begin{matrix} {{\sum{F^{2}\left( {x,y,z} \right)}} = {{a^{2}{\sum x^{4}}} + {2{ab}{\sum{x^{2}y^{2}}}} + {2a\; c{\sum{x^{2}z^{2}}}} + {2{ad}{\sum{x^{3}y}}} + {2{ae}{\sum{x^{3}z}}} + {2{af}{\sum{x^{2}{yz}}}} + {2{ag}{\sum x^{3}}} + {2{ah}{\sum{x^{2}y}}} + {2{ai}{\sum{x^{2}z}}} + {2a{\sum x^{2}}} + {b^{2}{\sum y^{4}}} + {2{bc}{\sum{y^{2}z^{2}}}} + {2{bd}{\sum{xy}^{3}}} + {2{be}{\sum{{xy}^{2}z}}} + {2{bf}{\sum{y^{3}z}}} + {2{bg}{\sum{xy}^{2}}} + {2{bh}{\sum y^{3}}} + {2{bi}{\sum{y^{2}z}}} + {2b{\sum y^{2}}} + {c^{2}{\sum z^{4}}} + {2c\; d{\sum{xyz}^{2}}} + {2{ce}{\sum{xz}^{3}}} + {2{cf}{\sum{yz}^{3}}} + {2{cg}{\sum{xz}^{2}}} + {2{ch}{\sum{yz}^{2}}} + {2{ci}{\sum z^{3}}} + {2c{\sum z^{2}}} + {d^{2}{\sum{x^{2}y^{2}}}} + {2{de}{\sum{x^{2}{yz}}}} + {2{df}{\sum{{xy}^{2}z}}} + {2d\; g{\sum{x^{2}y}}} + {2{dh}{\sum{xy}^{2}}} + {2{di}{\sum{xyz}}} + {2d{\sum{xy}}} + {e^{2}{\sum{x^{2}z^{2}}}} + {2{ef}{\sum{xyz}^{2}}} + {2{eg}{\sum{x^{2}z}}} + {2{eh}{\sum{xyz}}} + {2{ei}{\sum{xz}^{2}}} + {2e{\sum{xz}}} + {f^{2}{\sum{y^{2}z^{2}}}} + {2{fg}{\sum{xyz}}} + {2{fh}{\sum{y^{2}z}}} + {2{fi}{\sum{yz}^{2}}} + {2f{\sum{yz}}} + {g^{2}{\sum x^{2}}} + {2{gh}{\sum{xy}}} + {2{gi}{\sum{xz}}} + {2g{\sum x}} + {h^{2}{\sum y^{2}}} + {2{hi}{\sum{yz}}} + {2h{\sum y}} + {i^{2}{\sum z^{2}}} + {2i{\sum z}} + {\sum 1}}} & (7) \end{matrix}$

The error function may be minimized using a quasi-Newtonian method. Unfortunately, linear optimization methods, like the Quasi-Newtonian method, may stick into local minima because the error function is quadratic. However, applying the TTC technique to the set of training points before minimizing the error function reduces the risk that the quasi-Newtonian minimization method will get stuck in local minima. Therefore, the error function may converge more quickly if the TTC technique is applied to the set of training points before using the quasi-Newtonian method to minimize the error function. Minimizing the error function yields values for the set of unknown parameters Ψ. The values determined for Ψ by minimizing the error function are plugged into Equation 4 to define a model of the cloud of training points 602.

FIG. 10( a) illustrates the cloud of training points (dark points) 602 overlaying an exemplary model (empty circles) of the cloud of training points 602. FIG. 10( b) is a color version of FIG. 10( a). The model 1000 may be defined by substituting into Equation 4 the values for the set of parameters Ψ determined by minimizing the error function. As illustrated in FIGS. 10( a) and 10(b), the model has a first surface 1002 and a second surface 1004 both of which appear as hyperboloid-like shapes with vertices 1002 a and 1004 a, respectively, facing each other, and with both surfaces lying on a common axis (not shown). In one implementation, only the first surface 1002 is used to model the cloud of training points 602. As shown in FIGS. 10( a)-(b), the cloud of training points 602 does not entirely cover first surface 1002 and does not cover second surface 1004 at all.

FIG. 11( a) is an illustration of the first surface 1002 of the model 1000 for modeling the cloud of training points 602 in the eigenspace 600. Second surface 1004 is not included in FIGS. 11( a)-(c). FIG. 11( b) illustrates the cloud of training points (dark points) 602 overlaying the first surface 1002 of the model (empty circles) 1000. FIG. 11( c) is a color version of FIG. 11( b).

FIG. 12 is a process flowchart illustrating an exemplary process 1200 for recognizing an object in an image as a finger using a system trained with process 400. The process 1200 begins by creating a BGM of the IR consistently reflected by the surface 104 or other objects within the ROI 116 (operation 1202). An input image of the surface 104 and its vicinity then is captured by the camera 108 (operation 1204), and the BGM is subtracted from the input image (operation 1206).

As described in greater detail above in connection with FIGS. 2( a) and 2(b), a blob analysis algorithm, like Grassfire, is used to extract objects from the input image (operation 1208). As discussed in greater detail above in connection with FIG. 3, each of the objects extracted from the input image is processed to identify and discard objects that are either too small or too large to be a finger (operation 1210). The remaining objects are sorted into a list in ascending order of overall area (operation 1212).

The first object in the list then is converted into an n×n image and the resized n×n image is projected into the eigenspace 600 for the set of training data to obtain an image point (operation 1214). The TTC technique is applied to the image point to mimic the application of the TTC technique to the points in the cloud of training points 602 during the training stage 400 (operation 1216). The same TTC transfer values used in operation 412 may be used in operation 1216.

The coordinates of the image point are used to evaluate the quadratic polynomial defining the model 1000 of the cloud of training points 602 (operation 1218). If the image point lies on the model 1000, applying the coordinates of the image point to the polynomial will yield a value of zero. In contrast, if the image point does not lie on the model 1000, a non-zero, real number is obtained by applying the coordinates of the image point to the polynomial. The value obtained by applying the coordinates of the image point to the polynomial represents the distance between the image point and the model 1000.

An image corresponding to an image point that is located close to the model 1000 in the eigenspace 600 may exhibit similar characteristics as the images comprising the set of training images. Accordingly, it may be the case that the closer an image point is located to the model 1000, the more likely it is that the image corresponding to the image point is a finger. Therefore, an image corresponding to an image point that is found to lie on the model 1000 or an image point that falls within a maximum threshold distance of the model 1000 may be determined to be a finger.

Therefore, the value obtained by applying the coordinates of the image point to the quadratic polynomial is evaluated to determine whether it is less than a defined threshold distance (operation 1220). If the value obtained by applying the coordinates of the image point to the quadratic polynomial is less than the threshold distance, the object corresponding to the image point is deemed to be a finger (operation 1222). If the value obtained by applying the coordinates of the image point to the quadratic polynomial is greater than the maximum threshold distance, the image corresponding to the image point is discarded and the next object in the list is processed by proceeding to operation 1214 (operation 1224).

Reducing the dimensionality of an object captured in an image by projecting the object into an eigenspace allows the object to be compared to a model of images of training objects without having to compare each pixel of the captured object with each pixel of the model. As a result, processing power and resources are spared and/or the speed of the comparison is increased.

Referring now to FIGS. 13-19, additional implementations of the training and recognition stages are described.

FIG. 13 is a process flowchart illustrating an example of a process 1300 for training a finger recognition and tracking system 100 to recognize an object as a finger. Process 1300 includes the operation of applying a histogram equalization technique to each training image.

The process 1300 begins by creating a BGM of the IR consistently reflected by the surface 104 or other objects within the ROI 116 (operation 1302). A large number of input images of one or more fingers positioned in various different orientations are captured by the camera 108 (operation 1304), and the BGM is subtracted from each of the input images (operation 1306). The portion of each image representing the finger is extracted from the image and converted into a standard n×n image size (operation 1308). A histogram equalization technique is applied to each n×n image (operation 1310).

The histogram equalization technique is applied to the n×n images to account for variations in lighting conditions. The application of the histogram equalization technique to an n×n image involves generating a histogram of the intensities of the pixels in the n×n image, normalizing the histogram of the n×n image, and reassigning the values of the pixels in the n×n image based on the normalized image histogram. Consequently, individual pixels retain their brightness order (e.g., they remain brighter or darker than other pixels.

An eigenspace corresponding to the set of n×n training images of the finger is created and each training image is projected into the eigenspace (operation 1312).

As illustrated in FIG. 14, the projected training images form a cloud of training points 1402 in the eigenspace 1400. The TTC technique is applied to the cloud of training points 1402 in order to transfer the centroid of the cloud of training points 1402 to the origin of the eigenspace 1400 (operation 1314). The shape of the cloud of training points 1402 in FIG. 14 appears different than the shape of the cloud of training points 602 in FIG. 6. In particular, the cloud of training points 1402 in FIG. 14 has a tail 1406 at a vertex 1408 of a cone-like shape 1404. The difference in shape between the two clouds of training points 1402, 602 may be attributed to having applied the histogram equalization technique to the set of training images (operation 1310) because the histogram equalization technique reduces variations in the set of training images due to variations in lighting conditions. Consequently, when the training images are projected into the eigenspace 1400, a more uniform shape is obtained. The shape of the cloud of training points 602 in FIG. 6 reflects variation in lighting conditions as well as variation in finger shape and orientation within the set of training images. In contrast, the shape of the cloud of training points 1402 in FIG. 14 primarily reflects variation in finger shape and orientation within the set of training images.

Process 1300 includes fitting one or more models to the transferred cloud of training points 1402 (operation 1316). In order to model the cloud of training points 1402, the subset of training points forming the cone-like shape 1404 and the subset of training points forming the tail 1406 are considered separately. FIG. 15 illustrates the subset of training points forming the cone-like shape 1404 without the tail 1406. FIG. 16 illustrates the subset of training points forming the tail 1406 without the cone-like shape 1404.

A model may be created of the subset of training points forming the cone-like shape 1404 and a second model may be created of the subset of training points forming the tail 1406. As discussed above, Equation 4 provides the general formula for a three-dimensional quadratic surface. Therefore, a model of the set of training points forming the cone-like shape 1404 may be determined by first determining the unknown parameters Ψ of Equation 4 that minimize the error function of Equation 7 with respect to the set of points in the subset of training points forming the cone-like shape 1404. The values determined for Ψ by minimizing the error function are plugged into Equation 4 to define a model of the cloud of training points 1402.

Alternatively, a vertical cone may be used to model the subset of training images forming the cone-like shape 1404. As illustrated in FIG. 15, the cone-like cloud of training points 1404 exhibits the greatest amount of variation along the vertical axis 1500 representing the first principal component of the eigenspace 1400. In other words, the height dimension of the cone-like cloud 1404 is parallel to the first principal component of the eigenspace 1400. The observation that the cone-like cloud of training points 1404 exhibits the greatest amount of variation along the first principal component of the eigenspace 1400 is consistent with the fact that the eigenvector of the covariance matrix corresponding to the first principal component represents the direction in which the set of training images exhibits the greatest variation. Therefore, it may be possible to use a vertical cone to model the subset of training points that form the cone-like shape 1404. A general vertical cone is described by the equation:

$\begin{matrix} {{H\left( {x,y,z} \right)} = {\frac{\left( {x - a} \right)^{2}}{d^{2}} + \frac{\left( {y - b} \right)^{2}}{e^{2}} - \frac{\left( {z - c} \right)^{2}}{f^{2}}}} & (8) \end{matrix}$

where x and y represent the horizontal axes 1502, 1504 and z represents the vertical axis 1500 of the eigenspace 1400. The unknown parameters of Equation 8 are Ω=(a, b, c, d, e, f). In order to fit a vertical cone to the subset of training images forming the cone-like shape 1404, the values of the unknown parameters Ω that minimize Equation 8 with respect to the set of points in the subset of training points that forms the cone-like shape 1404 are determined. An error function for Equation 8 can be defined by the equation:

$\begin{matrix} {E = {\sum\limits_{{({x,y,z})} \in {TS}}{H^{2}\left( {x,y,z} \right)}}} & (9) \end{matrix}$

A quasi-Newtonian method may be used to minimize the error function of Equation 9. Minimizing the error function of Equation 9 yields values for the set of unknown parameters Ω These values are plugged into Equation 8 to define a vertical cone model of the subset of training points forming the cone-like shape 1404.

FIG. 17( a) illustrates the cloud of training points of the cone-like shape (dark diamonds) 1404 overlaying an exemplary vertical cone model (empty circles) 1700 of the cloud of training points of the cone-like shape 1404. FIG. 17( c) is a color version of FIG. 17( a). As illustrated in FIGS. 17( a) and 17(c), the vertical cone model 1700 has both a bottom surface 1702 and a top surface 1704. Each surface 1702 and 1704 forms a conical shape with the two conical shapes meeting at a common vertex 1706. The two conical shapes lie on a common axis (not shown). The cloud of training points forming the cone-like shape 1404 do not completely cover surface 1702 and do not cover surface 1704 at all. In one implementation, only the lower surface 1702 of the cone 1700 is used to model the cloud of training points of the cone-like shape 1404. FIG. 17( b) illustrates the cloud of training points of the cone-like shape (dark diamonds) 1404 overlaying the lower surface 1702 of the exemplary vertical cone model (empty circles) 1700 of the cloud of training points of the cone-like shape 1404. FIG. 17( d) is a color version of FIG. 17( b).

One model for the tail 1406 is a vertical line. The vertical line model of the tail 1406 is determined by calculating the mean of the training points of the tail 1406 along the horizontal axes 1602, 1604. FIG. 18( a) illustrates the cloud of training points of the tail (dark points) 1406 overlaying an exemplary vertical line model (dark line) 1800 of the cloud of training points forming the tail 1406. The cloud of training points forming the tail 1406 are clustered densely around a bottom portion 1810 of the line 1800 and gradually adopt a substantially linear shape nearer a top portion 1820 of the line 1800. FIG. 18( b) is a color version of FIG. 18( a). In an alternative implementation, the line 1800 may not be vertical. Instead, the line 1800 may be oriented so as to best match the set of training points forming the tail 1406.

FIG. 19 is a process flowchart illustrating an example of a process 1900 for recognizing a finger in an image. Process 1900 uses a system trained with process 1300.

The process 1900 begins by creating a BGM of the IR consistently reflected by the surface 104 or other objects within the ROI 116 (operation 1902). An input image of the surface 104 and its vicinity is captured by the camera 108 (operation 1904), and the BGM is subtracted from the input image (operation 1906). As described in greater detail above in connection with FIGS. 2( a) and 2(b), a blob analysis algorithm, like Grassfire, is used to extract objects from the input image (operation 1908). As discussed above in connection with FIG. 3, each of the objects extracted from the input image is processed to identify and discard objects that are either too small or too large to be a finger (operation 1910). The remaining objects are sorted into a list in ascending order of overall area (operation 1912). The first object in the list then is converted into an n×n image (operation 1914) and the same histogram equalization technique applied in process 1300 is applied to the resized image (operation 1916). After applying the histogram equalization technique to the image, the image is projected into the eigenspace for the set of training images and the TTC technique is applied to the image point to mimic the application of the TTC technique to the points in the cloud of training points 1402 during the training stage 1300 (operation 1918).

As described above, two models, the lower surface 1702 of a vertical cone 1700 and a vertical line 1800, are used to model the cloud of training points 1402. Therefore, a determination is made as to whether the vertical coordinate of the image point is above or below the vertex 1706 of the lower surface 1702 of the vertical cone model 1700 (operation 1920).

If the vertical coordinate of the image point is below the vertex 1706 of the vertical cone model 1700, the “N” branch is followed out of operation 1920. The coordinates of the image point are used to evaluate Equation 8 defining the vertical cone model 1700 of the cone-like cloud of training points 1404 (operation 1922). If the projected point lies on the surface of the vertical cone model 1700, applying the coordinates of the projected point to Equation 8 yields a value of zero. In contrast, if the image point does not lie on the surface of the vertical cone model 1700, a non-zero, real number is obtained by applying the coordinates of the image point to Equation 8. The value obtained by applying the coordinates of the image point to Equation 8 represents the distance between the image point and the vertical cone model 1700.

An image corresponding to an image point that is located close to the lower surface 1702 of the vertical cone model 1700 in the eigenspace 1400 may exhibit similar characteristics as some of the images comprising the set of training images. Accordingly, it may be the case that the closer an image is located to the lower surface 1702 of the vertical cone model 1700, the more likely it is that the image corresponding to the image point is a finger. An image corresponding to an image point that is found to lie on the lower surface 1702 of the vertical cone model 1700 or an image point that falls within a maximum threshold distance of the lower surface 1702 of the vertical cone model 1700 may be determined to be a finger.

Therefore, the value obtained by applying the coordinates of the image point to Equation 8 is evaluated to determine whether it is less than a defined threshold distance (operation 1924). If the value obtained by applying the coordinates of the image point to Equation 8 is less than the threshold distance (“Y” branch out of operation 1924), the image corresponding to the image point is deemed to be a finger (operation 1926). If the value obtained by applying the coordinates of the image point to Equation 8 is greater than the threshold distance (“N” branch out of operation 1924), the image corresponding to the image point is discarded and the next object in the list is processed by proceeding to operation 1914 (operation 1928).

If the vertical coordinate of the image point is above the vertex 1706 of the vertical cone model 1700, the “Y” branch is followed out of operation 1920. The coordinates of the image point are used to evaluate the equation defining the vertical line model 1800 (operation 1930). If the image point lies on the line 1800, applying the coordinates of the image point to the equation defining the line will yield a value of zero. In contrast, if the image point does not lie on the line 1800, a non-zero, real number will be obtained by applying the coordinates of the image point to the equation defining the line 1800. The value obtained by applying the coordinates of the image point to the equation defining the line 1800 represents the distance between the image point and the line 1800.

An image corresponding to an image point that is located close to the vertical line model 1800 in the eigenspace 1400 may exhibit similar characteristics as some of the images comprising the set of training images. Accordingly, it may be the case that the closer an image is located to the vertical line model 1800, the more likely it is that the image corresponding to the image point is a finger. An image corresponding to an image point that is found to lie on the vertical line model 1800 or an image point that falls within a maximum threshold distance of the vertical line model 1800 may be determined to be a finger.

Therefore, the value obtained by applying the coordinates of the image point to the equation defining the line is evaluated to determine whether it is less than the threshold distance (operation 1932). If the value obtained by applying the coordinates of the image point to the equation defining the line is less than the threshold distance (“Y” branch out of operation 1932), the image corresponding to the image point is deemed to be a finger (operation 1926). If the value obtained by applying the coordinates of the image point to the equation defining the line is greater than the threshold distance (“N” branch out of operation 1932), the image corresponding to the image point is discarded and the next object in the list may be processed by proceeding to operation 1914 (operation 1928).

Various techniques exist for adjusting the threshold distance. For example, one technique for adjusting the threshold distance involves applying the coordinates of the training points to the model of the training points. A threshold distance that includes 90% of the training points is considered a reasonable choice for the threshold distance in one implementation. Of course, other threshold distances or percentages may be selected.

FIG. 20 is a process flowchart illustrating an example of a process 2000 for recognizing an object in an image. The process begins by determining the coordinates for an image point characterizing an object in a multi-dimensional space (operation 2002). In one implementation, an image of a particular object is captured by a camera and received as input by a computer or software application. The image point characterizes the particular object captured in the image.

An equation describing a geometric model in the multi-dimensional space that is characteristic of training images is provided (operation 2004). The coordinates for the image point are applied to the equation describing the geometric model to determine a distance between the image point and the geometric model (operation 2006).

Based on the determined distance between the image point and the geometric model, a determination is made as to whether the object characterized by the image point matches the training images (operation 2008). More specifically, the object will be determined to match, or not, whatever type of object is captured by the training images.

In one implementation, determining the coordinates for the image point involves projecting the image into a different multi-dimensional space. The multi-dimensional space may be, for example, an eigenspace. In this implementation, the geometric model that is characteristic of training images is also in the multi-dimensional space.

A number of implementations have been described. Nevertheless, it will be understood that various modifications may be made. For example, a compact disk (CD), a processing device, or other computer readable medium may contain a program, instructions, or code segments for implementing any of the methods disclosed. Furthermore, a tool may be provided for implementing any of the methods disclosed. The tool may include, for example, a computer-readable medium, a processing device, a camera, a projector, or a combination of these and possibly other components. A processing device may include, for example, a processor, a computer, a programmable logic device, or an integrated circuit.

Implementations and features may be implemented, at least in part, in a variety of devices. Examples include a computer as described above, including a portable computer or other processing device. Examples also include a portable telephone; a personal digital assistant; a messaging device such as, for example, a pager or a portable e-mail device (such as, for example, a Blackberry®); a portable music player such as, for example, an iPod®; or another electronic portable messaging, entertainment, organization, or gaming device.

In addition, while the systems and methods disclosed generally have been described in the context of recognizing an object in an image as a finger, the ability to recognize other objects in an image are contemplated. The systems and methods described may be used to recognize any object that may be modeled by a geometric model in a space, for example, an eigenspace. For example, the systems and methods described may be used to recognize an object in an image as a pen or a can. In addition, elements of different implementations may be combined, supplemented, modified, or removed to produce other implementations.

While the methods described were described as including multiple operations, additional operations may be added to the methods disclosed. Furthermore, it may not be necessary to perform each operation and some operations, therefore, may be skipped. Moreover, the disclosed operations do not necessarily have to be performed in the order in which they were described.

Finally, various technologies may be used, combined, and modified to produce an implementation, such technologies including, for example, a variety of hardware, software, firmware, integrated components, discrete components, processing devices, memory or storage devices, communication devices, lenses, filters, display devices, and projection devices. Accordingly, other implementations are within the scope of the following claims. 

1. A computer program product, tangibly embodied in a machine readable medium, the computer program product comprising instructions that, when read by a machine, operate to cause data processing apparatus to: project electromagnetic radiation onto a surface; detect, using the projected electromagnetic radiation, an object touching the surface; determine whether the detected object is of a predetermined object type based on dimensions of the detected object; and generate a user input to a computer application based on the detected object, if it is determined that the detected object is of the predetermined object type. 